﻿Imports System.Data.OleDb
Imports GalaSoft.MvvmLight

Namespace FL_8x0.Base
    Public MustInherit Class ProductModel
        Inherits ViewModelBase

        Private _id As String
        Private _name As String
        Private _model As String
        Private _code As String

        Private _temporary As Boolean

        Public Property Id As String
            Get
                Return _id
            End Get
            Set
                _id = Value
                RaisePropertyChanged()
            End Set
        End Property

        Public Property Name As String
            Get
                Return _name
            End Get
            Set
                _name = Value
            End Set
        End Property

        Public Property Model As String
            Get
                Return _model
            End Get
            Set
                _model = Value
            End Set
        End Property

        Public Property Code As String
            Get
                Return _code
            End Get
            Set
                _code = Value
            End Set
        End Property

        Public Property Temporary As Boolean
            Get
                Return _temporary
            End Get
            Set(value As Boolean)
                _temporary = value
            End Set
        End Property

        Public MustOverride Function WriteProduct(dbCon As OleDbConnection, reason As String, blnShouldWrite As Boolean) As Boolean

        Public MustOverride Function ReadProduct(dbCon As OleDbConnection, id As String) As ProductModel


    End Class

End Namespace

